<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>上架商品</title>
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
    <script src="/assets/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
    <link href="/assets/css/main.css" rel="stylesheet">
</head>
<style>
    body,html{
        margin: 0;
    }
    body{
        background-image: url("/assets/images/background.jpg");

    }
</style>
<body>
<div class="container">
    <nav class="navbar navbar-expand-lg bg-body-tertiary">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">焕新网</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarScroll" aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarScroll">
                <ul class="navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll" style="--bs-scroll-height: 100px;">
                    <li class="nav-item">
                        <a class="nav-link active" aria-current="page" th:href="@{'/list?uid='+${user.id}}">首页</a>
                    </li>

                    <li class="nav-item dropdown">
                        <a class="nav-link" th:href="@{'/commodityList?uid='+${user.id}}" >订单</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link" th:href="@{'/inidle?uid='+${user.id}}" >我的闲置</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link" th:href="@{'/publish?uid='+${user.id}}">上架商品</a>
                    </li>

                </ul>
                <ul class="navbar-nav d-flex">
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                            个人中心
                        </a>
                        <ul class="dropdown-menu">
                            <li><a class="dropdown-item" href="#">基本信息</a></li>

                            <li><hr class="dropdown-divider"></li>
                            <li><a class="dropdown-item" href="#">注销登录</a></li>
                        </ul>
                    </li>
                </ul>
                <div class="user">
                    <img src="/assets/images/header.jpg" alt=""width="50" height="auto">
                    <span th:text="${user.nickname}"></span>
                </div>
            </div>
        </div>
    </nav>
</div>




<div class="login-container">
    <form th:action="@{'/publish?id='+${user.id}+'&cid='+${cid}}" th:method="'post'" class="login-form" enctype="multipart/form-data">
        <!--<form class="login-form">-->
        <div th:text="${message}" class="error"></div>
        <h2 style="color:red" class="text-center">商品发布</h2>

        <div class="form-item row" >
            <label for="name" class="col-sm-2 col-form-label">name</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="name" placeholder="请输入商品名" name="name">
            </div>
        </div>
        <div class="form-item row" >
            <label for="price" class="col-sm-2 col-form-label">price</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="price" placeholder="请输入价格" name="price">
            </div>
        </div>


        <div class="form-item row">
            <label for="introduce" class="col-sm-2 col-form-label">介绍</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="introduce" placeholder="请输入介绍" name="introduce">
            </div>
            <label for="formFileLg" class="col-sm-3 col-form-label">上传图片</label>
            <div class="col-sm-9">
            <input class="form-control form-control-lg" id="formFileLg" type="file" name="avator1" accept="image/*">
            </div>
        </div>

        <div class="form-item">
            <button type="submit" class="btn btn-primary login-submit">上架</button>
        </div>

    </form>
</div>
</body>


</html>